#include <CL/cl.h>
#include <iostream>
#include <vector>
using namespace std;
int main() {
  cl_uint num;
  clGetPlatformIDs(0, 0, &num);
  vector<cl_platform_id> platforms(num);
  clGetPlatformIDs(num, platforms.data(), &num);
  cout << platforms.size();
}